package com.tenbent.product.center.insures.bo;

import com.tenbent.product.base.bo.BizObject;
import com.tenbent.product.base.mybatis.annotations.TypeAlias;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 保障套餐保额
 *
 * @author Randy
 *
 *         Created by ThinkPad on 2017/8/21.
 */
@Entity
@Table(name = "pc_safeguard_package_detail")
@TypeAlias("safeguardPackageDetail")
public class SafeguardPackageDetail extends BizObject {

	@Column(name = "package_code")
	private String packageCode;

	@Column(name = "category_code")
	private String categoryCode;

	@Column
	private String amount;

	public String getPackageCode() {
		return packageCode;
	}

	public void setPackageCode(String packageCode) {
		this.packageCode = packageCode;
	}

	public String getCategoryCode() {
		return categoryCode;
	}

	public void setCategoryCode(String categoryCode) {
		this.categoryCode = categoryCode;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		SafeguardPackageDetail that = (SafeguardPackageDetail) o;

		if (packageCode != null ? !packageCode.equals(that.packageCode) : that.packageCode != null)
			return false;
		if (categoryCode != null ? !categoryCode.equals(that.categoryCode) : that.categoryCode != null)
			return false;
		return amount != null ? amount.equals(that.amount) : that.amount == null;

	}

	@Override
	public int hashCode() {
		int result = packageCode != null ? packageCode.hashCode() : 0;
		result = 31 * result + (categoryCode != null ? categoryCode.hashCode() : 0);
		result = 31 * result + (amount != null ? amount.hashCode() : 0);
		return result;
	}

	@Override
	public String toString() {
		return "SafeguardPackageDetail{" + "packageCode='" + packageCode + '\'' + ", categoryCode='" + categoryCode
				+ '\'' + ", amount='" + amount + '\'' + '}';
	}
}
